package com.imooc.spring.lambda;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;

/**
 * Description：
 *
 * @Author: spring
 * @Date: 2021/6/16
 */
public class FunctionTest {

    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1,2,13,14,18,101);
        Function<List<Integer>,Integer> function = f->{
            Integer max = Collections.max(f);
            return max;
        };
        System.out.println(function.apply(list));
    }
}
